package com.ktgj.flight.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktgj.flight.mapper.FlightInterfaceMapper;
import com.ktgj.flight.domain.FlightInterface;
import com.ktgj.flight.service.IFlightInterfaceService;

/**
 * 自动出票接口配置Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-11-10
 */
@Service
public class FlightInterfaceServiceImpl implements IFlightInterfaceService 
{
    @Autowired
    private FlightInterfaceMapper flightInterfaceMapper;

    /**
     * 查询自动出票接口配置
     * 
     * @param interfaceId 自动出票接口配置ID
     * @return 自动出票接口配置
     */
    @Override
    public FlightInterface selectFlightInterfaceById(Integer interfaceId)
    {
        return flightInterfaceMapper.selectFlightInterfaceById(interfaceId);
    }

    /**
     * 查询自动出票接口配置列表
     * 
     * @param flightInterface 自动出票接口配置
     * @return 自动出票接口配置
     */
    @Override
    public List<FlightInterface> selectFlightInterfaceList(FlightInterface flightInterface)
    {
        return flightInterfaceMapper.selectFlightInterfaceList(flightInterface);
    }

    /**
     * 新增自动出票接口配置
     * 
     * @param flightInterface 自动出票接口配置
     * @return 结果
     */
    @Override
    public int insertFlightInterface(FlightInterface flightInterface)
    {
        return flightInterfaceMapper.insertFlightInterface(flightInterface);
    }

    /**
     * 修改自动出票接口配置
     * 
     * @param flightInterface 自动出票接口配置
     * @return 结果
     */
    @Override
    public int updateFlightInterface(FlightInterface flightInterface)
    {
        return flightInterfaceMapper.updateFlightInterface(flightInterface);
    }

    /**
     * 批量删除自动出票接口配置
     * 
     * @param interfaceIds 需要删除的自动出票接口配置ID
     * @return 结果
     */
    @Override
    public int deleteFlightInterfaceByIds(Integer[] interfaceIds)
    {
        return flightInterfaceMapper.deleteFlightInterfaceByIds(interfaceIds);
    }

    /**
     * 删除自动出票接口配置信息
     * 
     * @param interfaceId 自动出票接口配置ID
     * @return 结果
     */
    @Override
    public int deleteFlightInterfaceById(Integer interfaceId)
    {
        return flightInterfaceMapper.deleteFlightInterfaceById(interfaceId);
    }

    /**
     * 根据航司二字码和出票类型获取出票详细信息
     * @param airliner 航司二字码
     * @param sourceType 类型
     * @return
     */
    @Override
    public FlightInterface selectFlightInterfaceByAirCodeAndType(String airliner, Long sourceType) {
        return flightInterfaceMapper.selectFlightInterfaceByAirCodeAndType(airliner,sourceType);
    }

}
